#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>

int IsTheNumer(const int N)
{
    int n = N;
    int  a = (int)sqrt(N);
int    s = a * a;
int c;
int count[10] = { 0 };
int b = sizeof(count) / sizeof(count[0]);

    if (s == n)
    {
       
        while (n)
        {
            c = n % 10;
            count[c]++;
            n /= 10;
     }
        for (int i = 0; i < b; i++)
        {
            if (count[i] >= 2)
            {
                return 1;
            }
     }

    }
    return 0;
}
int main()
{
    int a = IsTheNumer(2022);
    printf("%d\n", a);

    return 0;
}